#ifndef CONTACTLISTITEM_H
#define CONTACTLISTITEM_H

#include <QWidget>
#include "Models/group.h"

namespace Ui {
class ContactListItem;
}

class ContactListItem : public QWidget
{
    Q_OBJECT

public:
    explicit ContactListItem(QWidget *parent = nullptr);
    ~ContactListItem();

    void Selected(bool selected);
    void Checked(bool checked);

private:
    Ui::ContactListItem *ui;
    Group *data;
    bool isSelected;

    void mousePressEvent(QMouseEvent *event);
    void enterEvent(QEvent *event);
    void leaveEvent(QEvent *event);

public:
    void item(Group *data);
    Group* item();

signals:
    void selected(ContactListItem *item);
};
Q_DECLARE_METATYPE(ContactListItem*)
#endif // CONTACTLISTITEM_H
